package com.nanachi.feign.core.http;

import lombok.Builder;
import lombok.Data;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author yuhongtai
 * feign自己的request对象
 */
@Data
@Builder
public class FeignRequest {
    /**
     * http消息类型
     */
    public enum HttpMethod{
        OPTIONS,POST,GET;
    }

    private final FeignRequest.Body body;

    private final HttpMethod httpMethod;


    public static class Body {

        private Map<String, Object> body = new LinkedHashMap<>();

        public void addBodyParams(String key, String value){
            body.put(key, value);
        }



    }

    private Map<String, Object> headers;



}
